<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/6/29
 * Time: 19:41
 */

$redis = new \Redis();
$redis->connect('127.0.0.1', '6379');
$redis->select(0);

//$redis->set('goods_num',100);
echo $redis->get('goods_num');
var_dump($redis->lRange('user_id',0,200));
echo $redis->lPop('user_id');
echo $redis->rPop('user_id');